﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="SanPhamTheoNhaSanXuat.aspx.cs" Inherits="SanPhamTheoNhaSanXuat" Title="Sản phẩm theo nhà sản xuất" %>
<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly="CollectionPager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
function Lay(id)
{
    if(SanPhamBUS.KiemTraLaLapTop(id))
        return "ChiTietLapTop.aspx?ID={0}";
    else
        return "asdf";
    
};

</script>
<asp:DataList ID="DataList_SanPham" runat="server" RepeatColumns="3">
        <ItemTemplate>
        <%          
          int id = Convert.ToInt16(Request["ID"]);
          DTO.DanhMucSanPhamDTO temp = DAO.DanhMucSanPhamDAO.LayDanhMucSanPhamTheoID(id);
          if (temp.MaNhomDanhMucSanPham == 1)
          {%>           
            <asp:HyperLink ID="ChiTiet" runat="server" Font-Bold="True" 
                Font-Size="Medium" ForeColor="#0000CC"                                 
                NavigateUrl='<%# Eval("ID", "ChiTietLapTop.aspx?ID={0}") %>'
                Text='<%# Eval("TenSanPham") %>'                                               
            ></asp:HyperLink>  
          <%}
          else if (temp.MaNhomDanhMucSanPham == 2)
          {%> 
            <asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True" 
                Font-Size="Medium" ForeColor="#0000CC"                                 
                NavigateUrl='<%# Eval("ID", "ChiTietDienThoai.aspx?ID={0}") %>'
                Text='<%# Eval("TenSanPham") %>'                                               
            ></asp:HyperLink>  
          <%}%>                        
            <br />
            <br />
            <asp:Image ID="Image3" runat="server" Height="150px" 
                ImageUrl='<%# Eval("HinhSanPham","~/Image/{0}") %>' Width="175px" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <br />
            <br />
            <asp:Label ID="Label2" runat="server" Font-Italic="False" Font-Size="Medium" 
                ForeColor="Red" Text='<%# "Giá  bán :  " + Eval("GiaBanHienTai") + "VNĐ" %>'></asp:Label>
            
            
            <br />
            <br />
            <br />
        </ItemTemplate>
</asp:DataList>

<CC1:COLLECTIONPAGER id="CollectionPager2" runat="server" BackText="« Trang Trước" 
        FirstText="Đầu Tiên" LabelText="Trang :" LastText="Sau Cùng" 
        NextText="Trang Sau »" 
        ResultsFormat="Hiển Thị  Kết Quả Trang {0}-{1} (Tổng Số {2})">
    </CC1:COLLECTIONPAGER> 

</asp:Content>

